package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * SetmealDishMapper
 *
 * @author liliudong
 * @version 1.0
 * @description
 * @date 2023/6/8 17:58
 */
@Mapper
public interface SetmealDishMapper {
    /**
     * 查询数量
     *
     * @param dishIds
     * @return
     */
    Integer selectCountByDishIds(List<Long> dishIds);

    /**
     * 批量新增
     *
     * @param setmealDishes
     */
    void insertBatch(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐ID批量删除
     *
     * @param setmealIds
     */
    void deleteBySetmealIds(List<Long> setmealIds);

    /**
     * 查询列表
     *
     * @param setmealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> selectListBySetmealId(Long setmealId);
}
